﻿@{
    var picThumbSizeService = Presentation.Web.Admin
        .PreAdminEngine.Resolve<Application.Admin.Pic.IPicThumbSizeService>();
    var picThumbSize = picThumbSizeService.GetList().Where(e => e.State == true);
}
<fieldset>
    <legend><a href="/pic/picthumbsizeindex/">缩略图设置</a></legend>
    @{
        foreach (var item in picThumbSize)
        {
            if (Request.Path.ToLower().StartsWith("/goods") && item.Name.IndexOf("商品") >= 0)
            {
        <input type="checkbox" value="@(item.Id)" id="picThumbSize@(item.Id)" name="picThumbSize" checked="checked" />@(item.Name)
            }
            else if (Request.Path.ToLower().StartsWith("/sight") && item.Name.IndexOf("景点") >= 0)
            {
        <input type="checkbox" value="@(item.Id)" id="picThumbSize@(item.Id)" name="picThumbSize" checked="checked" />@(item.Name)
            }
            else if (Request.Path.ToLower().StartsWith("/tour") && item.Name.IndexOf("线路") >= 0)
            {
        <input type="checkbox" value="@(item.Id)" id="picThumbSize@(item.Id)" name="picThumbSize" checked="checked" />@(item.Name)
            }
            else if (Request.Path.ToLower().StartsWith("/article") && item.Name.IndexOf("活动") >= 0)
            {
        <input type="checkbox" value="@(item.Id)" id="picThumbSize@(item.Id)" name="picThumbSize" checked="checked" />@(item.Name)
            }
            else if (Request.Path.ToLower().StartsWith("/advertise") && item.Name.IndexOf("广告") >= 0)
            {
        <input type="checkbox" value="@(item.Id)" id="picThumbSize@(item.Id)" name="picThumbSize" checked="checked" />@(item.Name)
            }
            else
            {
               if(item.Name.IndexOf("广告") < 0)
               {
               <input type="checkbox" value="@(item.Id)" id="picThumbSize@(item.Id)" name="picThumbSize"/>@(item.Name)
               } 
            }
        }
    }
</fieldset>
